home *** CD-ROM | disk | FTP | other *** search
- /* (C) Copyright 1991 Dave Fritsche (wb8zxu), All Rights Reserved.
- *
- * Redistribution and use in source and binary forms are permitted for
- * non-commercial use, provided that the above copyright notice and this
- * paragraph are duplicated in all such forms. THIS SOFTWARE IS PROVIDED
- * ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
- * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.
- */
- #include <dos.h>
- #include <stdio.h>
-
- #define VIDEO_IO 0x10 /* bios interrupt for video fcns */
- #define WCHARA 0x09 /* write a char and attribute */
- #define SETPOS 0x02 /* set cursor position */
-
- wrbiosch(r, c, ch, nch, attr)
- int r, c, ch, nch, attr;
- {
- union REGS in_regs, out_regs;
-
- in_regs.h.ah = SETPOS;
- in_regs.h.bh = 0; /* display page */
- in_regs.h.dh = r; /* row */
- in_regs.h.dl = c; /* column */
- int86(VIDEO_IO, &in_regs, &out_regs); /* set cursor position */
-
- in_regs.h.ah = WCHARA; /* video service */
- in_regs.h.bh = 0; /* active page # */
- in_regs.h.al = ch; /* char to write */
- in_regs.x.cx = nch; /* # chars to write */
- in_regs.h.bl = attr; /* attribute */
- int86(VIDEO_IO, &in_regs, &out_regs); /* write char & attribute */
- }
-